package com.yinhd.study.activemq;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

import javax.jms.JMSException;
import javax.jms.TextMessage;

/**
 * @program: study
 * @description:
 * @Author: chengl
 * @create: 2022-04-06 16:24
 **/
@Component
public class ActiveCustomer {

    @JmsListener(destination = "${myqueue}")
    public void receive(TextMessage textMessage) throws JMSException {
        System.out.println("****消费者收到消息:" +  textMessage.getText());
    }
}
